//
//  HRZClassifyHeardView.m
//  EMarket
//
//  Created by 石头 on 2018/8/29.
//  Copyright © 2018 好日子. All rights reserved.
//

#import "HRZClassifyHeardView.h"

// Controllers
#import "HRZBaseViewController.h"
// Models
#import "HRZGoodsClassifyContentModel.h"
// Views

// Vendors

// Categories
#import "HRZSpeedy.h"
// Others


@interface HRZClassifyHeardView ()

@property (weak, nonatomic) IBOutlet UILabel *mTitleLabel;
@property (weak, nonatomic) IBOutlet UIView *mMoreView;

@end


@implementation HRZClassifyHeardView

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(HRZClassifyTypeModel *)model {
    _model = model;
    self.mTitleLabel.text = _model.name;
    self.mMoreView.hidden = _model.type != ClassifyTypeClassify;
}

- (IBAction)onMoreBtnClick:(id)sender {
    HRZBaseViewController *newVc = [HRZBaseViewController new];
    
    UIButton *back = [UIButton buttonWithType:UIButtonTypeContactAdd];
    back.frame = CGRectMake(20, 20, 40, 40);
    [back addTarget:self action:@selector(backClick) forControlEvents:UIControlEventTouchUpInside];
    [newVc.view addSubview:back];
    
    [[HRZSpeedy hrz_getCurrentVC].navigationController pushViewController:newVc animated:YES];
}

- (void)backClick{
    [[HRZSpeedy hrz_getCurrentVC].navigationController popViewControllerAnimated:YES];
}

@end
